package April.sixteen;

import java.util.HashMap;
import java.util.Map;

public class HashMapDemo {
    public static void main(String[] args) {
//    利用自定义类作为值存储到Map中
        /*Person per = new Person();
        HashMap<Integer,Person> hah = new HashMap<>();
        hah.put(1,new Person("张飞",1));
        hah.put(2,new Person("关羽",12));
        hah.put(3,new Person("刘备",13));
        for (Map.Entry<Integer ,Person> j : hah.entrySet()){
            System.out.println(j.getKey()+"  "+j.getValue());
        }*/

//        Person p = new Person("张飞",10);
    }


}
